<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>yLib: /home/sky/yLib/tests/network/tcp/ytcpserver_tests.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">yLib
   &#160;<span id="projectnumber">V0.0.9 beta</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('ytcpserver__tests_8cpp.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">ytcpserver_tests.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;catch2/catch.hpp&quot;</code><br />
<code>#include &quot;<a class="el" href="ylib_8hpp_source.html">ylib.hpp</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a33bb3dd4e89617166d3978a741e9f77a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ytcpserver__tests_8cpp.html#a33bb3dd4e89617166d3978a741e9f77a">test_OnClientConnectCB</a> (uint64_t client_fd_, const <a class="el" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> &amp;client_ip_, uint64_t client_port_)</td></tr>
<tr class="separator:a33bb3dd4e89617166d3978a741e9f77a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf209aabf4b31f76b723271b0fd8e2d2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ytcpserver__tests_8cpp.html#acf209aabf4b31f76b723271b0fd8e2d2">test_OnClientDisconnectCB</a> (uint64_t client_fd_, const <a class="el" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> &amp;client_ip_, uint64_t client_port_)</td></tr>
<tr class="separator:acf209aabf4b31f76b723271b0fd8e2d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32a0c7d5751bc3deebf4cae5a8bafd33"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ytcpserver__tests_8cpp.html#a32a0c7d5751bc3deebf4cae5a8bafd33">TEST_CASE</a> (&quot;Test <a class="el" href="classyLib_1_1yTcpServer.html">yTcpServer</a> apis&quot;, &quot;[yTcpServer_Apis]&quot;)</td></tr>
<tr class="separator:a32a0c7d5751bc3deebf4cae5a8bafd33"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a6444d3615050b8bbddab81a408f973f8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ytcpserver__tests_8cpp.html#a6444d3615050b8bbddab81a408f973f8">g_is_tcpserver_continue</a> = true</td></tr>
<tr class="separator:a6444d3615050b8bbddab81a408f973f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa37f2fd292401649deea6179dd1ad2c7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ytcpserver__tests_8cpp.html#aa37f2fd292401649deea6179dd1ad2c7">g_client_array</a> [3] = {0, 0, 0}</td></tr>
<tr class="separator:aa37f2fd292401649deea6179dd1ad2c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97cafbea90e00dc7acad6d2da2df9447"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ytcpserver__tests_8cpp.html#a97cafbea90e00dc7acad6d2da2df9447">g_client_port_array</a> [3] = {0, 0, 0}</td></tr>
<tr class="separator:a97cafbea90e00dc7acad6d2da2df9447"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68b3900b1fc89054cbd1e7ec3faebc39"><td class="memItemLeft" align="right" valign="top"><a class="el" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ytcpserver__tests_8cpp.html#a68b3900b1fc89054cbd1e7ec3faebc39">g_client_ip_array</a> [3] = {&quot;&quot;, &quot;&quot;, &quot;&quot;}</td></tr>
<tr class="separator:a68b3900b1fc89054cbd1e7ec3faebc39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b35c8498b60b8c275ae8b5513a42cf0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ytcpserver__tests_8cpp.html#a8b35c8498b60b8c275ae8b5513a42cf0">g_client_array_idx</a> = 0</td></tr>
<tr class="separator:a8b35c8498b60b8c275ae8b5513a42cf0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a32a0c7d5751bc3deebf4cae5a8bafd33"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32a0c7d5751bc3deebf4cae5a8bafd33">&#9670;&nbsp;</a></span>TEST_CASE()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST_CASE </td>
          <td>(</td>
          <td class="paramtype">&quot;Test <a class="el" href="classyLib_1_1yTcpServer.html">yTcpServer</a> apis&quot;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&quot;&quot;&#160;</td>
          <td class="paramname">[yTcpServer_Apis]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a33bb3dd4e89617166d3978a741e9f77a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33bb3dd4e89617166d3978a741e9f77a">&#9670;&nbsp;</a></span>test_OnClientConnectCB()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void test_OnClientConnectCB </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>client_fd_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> &amp;&#160;</td>
          <td class="paramname"><em>client_ip_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>client_port_</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="acf209aabf4b31f76b723271b0fd8e2d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acf209aabf4b31f76b723271b0fd8e2d2">&#9670;&nbsp;</a></span>test_OnClientDisconnectCB()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void test_OnClientDisconnectCB </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>client_fd_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> &amp;&#160;</td>
          <td class="paramname"><em>client_ip_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>client_port_</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="aa37f2fd292401649deea6179dd1ad2c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa37f2fd292401649deea6179dd1ad2c7">&#9670;&nbsp;</a></span>g_client_array</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int g_client_array[3] = {0, 0, 0}</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a8b35c8498b60b8c275ae8b5513a42cf0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b35c8498b60b8c275ae8b5513a42cf0">&#9670;&nbsp;</a></span>g_client_array_idx</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int g_client_array_idx = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a68b3900b1fc89054cbd1e7ec3faebc39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a68b3900b1fc89054cbd1e7ec3faebc39">&#9670;&nbsp;</a></span>g_client_ip_array</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> g_client_ip_array[3] = {&quot;&quot;, &quot;&quot;, &quot;&quot;}</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a97cafbea90e00dc7acad6d2da2df9447"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a97cafbea90e00dc7acad6d2da2df9447">&#9670;&nbsp;</a></span>g_client_port_array</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int g_client_port_array[3] = {0, 0, 0}</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a6444d3615050b8bbddab81a408f973f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6444d3615050b8bbddab81a408f973f8">&#9670;&nbsp;</a></span>g_is_tcpserver_continue</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool g_is_tcpserver_continue = true</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_59425e443f801f1f2fd8bbe4959a3ccf.html">tests</a></li><li class="navelem"><a class="el" href="dir_4166b9b5ef066b3a88619bbc1a7ebd3b.html">network</a></li><li class="navelem"><a class="el" href="dir_b64677c09b027872d067055382a386de.html">tcp</a></li><li class="navelem"><a class="el" href="ytcpserver__tests_8cpp.html">ytcpserver_tests.cpp</a></li>
    <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
  </ul>
</div>
</body>
</html>
